package com.rightsidetech.system.mapper;


import com.rightsidetech.commom.base.TimeQueryRequest;
import com.rightsidetech.system.dtos.request.SysStoreStorkReplenishReq;
import com.rightsidetech.system.dtos.request.store.SysAgentStorkReplenishReq;
import com.rightsidetech.system.dtos.response.*;
import com.rightsidetech.system.dtos.response.store.SysAgentStorkReplenishResp;
import com.rightsidetech.system.entity.SysStoreReplenish;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface SysStoreReplenishMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SysStoreReplenish record);

    int insertSelective(SysStoreReplenish record);

    SysStoreReplenish selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysStoreReplenish record);

    int updateByPrimaryKey(SysStoreReplenish record);

    List<SysStoreStorkReplenishResp> selectReplenish(SysStoreStorkReplenishReq req);

    List<SysStoreStorkReplenishResp> selectReplenishOneByList(@Param("req")SysStoreStorkReplenishReq req,@Param("list")List<Long> replenishId);

    Long selectReplenishOneByList_COUNT(@Param("req")SysStoreStorkReplenishReq req,@Param("list")List<Long> replenishId);

    List<SysAgentStorkReplenishResp> selectAgentReplenish(@Param("req") SysAgentStorkReplenishReq req, @Param("agentId") Long agentId);

    List<SysAgentStorkReplenishResp> selectAgentReplenishOne(@Param("req") SysAgentStorkReplenishReq req, @Param("agentId") Long agentId,@Param("list")List<Long> replenishId);

    List<SysStoreStorkReplenishAppResp> selectReplenishApp(@Param("storeId") Long storeId, @Param("verify") Byte verify, @Param("timeQueryRequest")TimeQueryRequest timeQueryRequest);

    List<SysAgentStorkReplenishListResp> selectReplenishAgent(@Param("agentInfoId") Long agentInfoId, @Param("timeQueryRequest")TimeQueryRequest timeQueryRequest);

    List<SysStoreStorkReplenishListResp> allDate(Long storeId);

    List<SysAgentStorkStoreResp> allDateByStoreId(@Param("storeId")Long storeId,@Param("time")String time);
    List<String> allDateStringByStoreId(@Param("storeId")Long storeId,@Param("time")String time);

    int updateVerifyById(Long id);

    int updateNum(@Param("replenishId") Long id,@Param("num")Long num);

    Long selectCountVerify(Long storeId);

    List<Long> selectByStoreId(Long storeId);

    List<SysStorkDetailsTimeOutResp> selectTimeOut(@Param("storeId")Long storeId,@Param("time")String time);

    List<SysStoreStorkDetailsAppResp> timeOutDetails(Long replenishId);

    Long findConfirmStock(@Param("storeId") Long storeId);

}